package com.typhoon.spring_redis.test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.GenericToStringSerializer;

public class testMain {
	
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("META-INF/spring-redis.xml");
		RedisTemplate<String, String> redisTemplate = (RedisTemplate<String, String>) context.getBean("redisTemplate");
		 redisTemplate.setValueSerializer(new GenericToStringSerializer<String>(String.class));
		Object value =  redisTemplate.opsForValue().get("aeolus");
		System.out.println(value.toString());
		
	}

}
